package com.walle.gatewayserver.vo;


import lombok.Getter;
import lombok.Setter;

/**
 * ajax返回结果对象
 */
@Setter
@Getter
public class ApiResult<T> {


    // 返回CODE码(根据不同业务返回不同的CODE码)
    protected int code=1;

    // 返回的中文消息
    protected String msg;

    // 成功时携带的数据
    protected T data;

    protected int count;
    
    public ApiResult() {

    }

    public ApiResult(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public ApiResult(int code, String msg, T data) {
        this.code = code;
        this.msg = msg;
        this.data = data;
    }
    
    public ApiResult(int code, String msg, T data,int count) {
        this.code = code;
        this.msg = msg;
        this.data = data;
        this.count=count;
    }

}
